import request from 'utils/request';
import { stringify } from 'qs';

export function getListConstruction(params) {
	return request(`/api/peopleConstruction/page?${stringify(params)}`);
}

export function upload(params) {
	return request('/upload', {
		body: params,
		method: 'POST',
	});
}

export function getDetailConstruction(params) {
	return request(`/api/peopleConstruction/detail?${stringify(params)}`);
}

export function addConstruction(params) {
	return request('/api/peopleConstruction/add', {
		body: params,
		method: 'POST',
	});
}

export function updateConstuction(params) {
	return request('/api/peopleConstruction/update', {
		body: params,
		method: 'POST',
	});
}

export function deleteConstruction(params) {
	return request('/api/peopleConstruction/delete', {
		body: params,
		method: 'POST',
	});
}

export function getListConvenience(params) {
	return request(`/api/baseInstallation/page?${stringify(params)}`);
}

export function updateConvenience(params) {
	return request('/api/baseInstallation/update', {
		body: params,
		method: 'POST',
	});
}

export function getListEvent(params) {
	return request(`/api/issue/page?${stringify(params)}`);
}

export function getListPark(params) {
	return request(`/api/parkingLot/page?${stringify(params)}`);
}

export function updatePark(params) {
	return request('/api/parkingLot/update', {
		body: params,
		method: 'POST',
	});
}

export function dateExist(params) {
	return request(`/api/peopleConstruction/getOneByDate?${stringify(params)}`);
}
